<?php header("Content-Type:text/html;   charset=utf-8"); ?>
<script type="text/javascript">
	$(function(){
		$("a[href='#maximize']").trigger("click");	
		loadAlbums();
	});
	function loadAlbums(){
		var uid = $("#hduid").val();
		var params = {uid:uid};
		
		$.ajax({
			type:"post",
			url:"admin.php/manage/loadAlbums",
			dataType:"json",
			data:params,
			success:function(data){
				$("#ulAlbum").html(data.album);							
			}
		});
	}
	function showdetail(uid,id){		
		$("#hrefEditAlbum").attr("href","admin.php/manage/albumdetail?id="+id+"&uid="+uid).text("照片管理");
		$("#hrefEditAlbum").trigger("click");
	}
	function delalbum(id){
		if(confirm('确认要将其删除吗？')){
			var params = {id:id};
			$.ajax({
				type:"post",
				url:"admin.php/manage/delAblums",
				dataType:"json",
				data:params,
				success:function(data){
					alert("删除成功");
					loadAlbums();
				}
			});
		}
	}
	function ablumTrash(id){
		$("#hrefEditAlbum").attr("href","admin.php/manage/albumtrash?id="+id).text("回收站管理");
		$("#hrefEditAlbum").trigger("click");
	}
	function basicCard(){
		var id = $("#hduid").val();
		$("#hrefEditAlbum").attr("href","admin.php/manage/newuser?id="+id).text("基本信息");
		$("#hrefEditAlbum").trigger("click");
	}
	function rzCard(){
		var id = $("#hduid").val();
		$("#hrefEditAlbum").attr("href","admin.php/manage/auditCard?id="+id).text("认证管理");
		$("#hrefEditAlbum").trigger("click");
	}
</script>
<div class="pageContent">
	<form class="pageForm required-validate"
		onsubmit="return validateCallback(this, navTabAjaxDone);">
		<li style="display: none"><a id="hrefEditAlbum" class="edit" href=""
			lookupgroup="orgLookup"><span>修改</span></a></li>
		<div class="panelBar">
			<ul class="toolBar">
			<li><span>快速导航：</span></li>
			<li><a onclick='basicCard()' class="edit" href="javascript:void(0)"><span>基本信息</span></a></li>
			<li><a onclick='rzCard()' class="edit" href="javascript:void(0)"><span>认证管理</span></a></li>
			<li><a id="hrefAblumTrash" onclick='ablumTrash(<?php echo $_GET["id"];?>)' class="edit" href="javascript:void(0)"><span>回收站管理</span></a></li>
			</ul>
		</div>
		<div class="pageFormContent" style="float: left; width: 100%;"
			layoutH="56">
			<div class="xiangce">
				<ul id="ulAlbum">
				</ul>
			</div>			
		</div>

		<input type="hidden" id="hduid"
			value="<?php if(isset($_GET["id"])) print $_GET["id"]; else print 0;?>">

		<div class="pageFormContent"
			style="float: right; width: 460px; overflow: auto;" layoutH="56"
			id="divExistsNew"></div>
	</form>
</div>
